Skip to content

Add tests for new FieldSet object#1998

Merged
VeckoTheGecko merged 12 commits intov4-devfrom
fieldset-tests
May 6, 2025
Merged

Add tests for new FieldSet object#1998
VeckoTheGecko merged 12 commits intov4-devfrom
fieldset-tests

Conversation

@VeckoTheGecko
Copy link
Copy Markdown
Contributor

  • Chose the correct base branch (v4-dev for v4 changes)
  • Fixes none
  • Added tests

Changes:

  • testing:
    • Add U and V fields to example datasets
    • Add fieldset tests (and stubs for future tests)
  • cleanup
    • Remove reference to _parent_mesh
    • Split reprs into a separate file
  • code
    • Add check for field type in FieldSet.add_field
    • Add fieldset.constants (avoids call to setattr)
    • Add FieldSet.__getattr__
    • Fix FieldSet.add_constant_field

Comment thread parcels/_reprs.py
Comment thread parcels/fieldset.py
Comment thread parcels/fieldset.py
Comment thread tests/v4/test_fieldset.py
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any more tests we should have in here @fluidnumerics-joe ? (even if its just stubs def test_my_thing():... so that we don't forget them later)

@fluidnumericsJoe
Copy link
Copy Markdown
Contributor

Taking a look right after the elphe meeting this morning

Copy link
Copy Markdown
Contributor

@fluidnumericsJoe fluidnumericsJoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple minor changes

Comment thread parcels/fieldset.py
Comment thread parcels/fieldset.py
@github-project-automation github-project-automation bot moved this from Backlog to Ready in Parcels development May 5, 2025
@VeckoTheGecko
Copy link
Copy Markdown
Contributor Author

Just a couple minor changes

I've responded now :)

Any more tests we should have in here @fluidnumerics-joe ? (even if its just stubs def test_my_thing():... so that we don't forget them later)

Let me know if anything comes to mind.

Good to merge?

@VeckoTheGecko VeckoTheGecko merged commit 7a39473 into v4-dev May 6, 2025
6 of 11 checks passed
@VeckoTheGecko VeckoTheGecko deleted the fieldset-tests branch May 6, 2025 15:40
@github-project-automation github-project-automation bot moved this from Ready to Done in Parcels development May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants